package com.sigmatrix.h5.web.controller.utils;

import javax.servlet.http.HttpServletRequest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.sigmatrix.h5.entity.MultistageLevelQRCode;
import com.sigmatrix.h5.service.MultistageLevelQrCodeService;
import com.sigmatrix.h5.web.BaseController;
import com.sigmatrix.h5.web.args.QueryQrCodeParamV2;

/**
 * 通过multistageLevelQrCode测试常用操作
 * 
 * @author wei.wang
 *
 */
@RestController
@RequestMapping("/util/test/multistageLevelQrCode")
public class TestMultistageLevelQrCodeController extends BaseController {

	@Autowired
	private MultistageLevelQrCodeService multistageLevelQrCodeService;

	//
	@PostMapping("/select/seqnum/esecode/{esecode}")
	public MultistageLevelQRCode findBySeqNum(HttpServletRequest request,@RequestBody QueryQrCodeParamV2 param, @PathVariable String esecode) {
		return multistageLevelQrCodeService.findBySeqNum(param.getQrCode(),esecode);
	}
	
	//
	@PostMapping("/select/qrcode/esecode/{esecode}")
	public MultistageLevelQRCode findByQRCode(HttpServletRequest request,@RequestBody QueryQrCodeParamV2 param, @PathVariable String esecode) {
		return multistageLevelQrCodeService.findByPackContent(param.getQrCode(),esecode);
	}
	
	
}
